﻿using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using Orchard.ContentManagement;

namespace DreamStore.WebShop.Models
{
    public class CustomerDiscountProgramPart : ContentPart<CustomerDiscountProgramPartRecord>
    {
        [Required]
        [DisplayName("Name")]
        public string Name
        {
            get { return Record.Name; }
            set { Record.Name = value; }
        }

        [Required]
        [DisplayName("Discount")]
        [Range(0.0, 1.0, ErrorMessage = "Discount must be between 0 and 100% [0,0 - 1,0]")]
        public double Discount
        {
            get { return Record.Discount; }
            set { Record.Discount = value; }
        }

    }
}